<?php
	include 'ZionHeader.inc';
?>
<HTML>
<head>
<title>ZionsAuto</title>

	<?php
		$name = $_SESSION['UName'];
		$password = $_POST['password'];
		
		
		//Need to compare $name with username of announcement
	?>

  <link rel="stylesheet" href="styles.css" type="text/css" />
</head>
<BODY>
<h1><center>Users</center></h1>

<!-- Tab Menu Goes here -->
<div id="tabs">
  <ul>
    <li><a href="homePage.php"><span>Home</span></a></li>
    <li><a href="Browse.php"><span>Browse</span></a></li>
	<li><a href="announcement.php"><span>Announcements</span></a></li>
	<li><a href="postAnnouncement.php"><span>Post Announcement</span></a></li>
    <li><a href="logout.php"><span>Log Out</span></a></li>
  </ul>
</div>

<?php

	$AccountType = $_SESSION['AType'];
	include 'DatabaseConnect.inc';
	
	$query = "SELECT * FROM User";
	$result = mysql_query($query);
	
	echo "<table border='1'>";
		echo "<tr>  <th>LoginID</th> <th>Password</th> <th>Email</th> <th>PhoneNumber</th> <th>State</th> <th>City</th> <th>Street_Num</th> <th>Road</th> <th>Zip_Code</th> <th>Country</th> <th>Type</th>";
	
	while($row = mysql_fetch_array( $result ))
	{
		
	
		echo "<tr><td>"; 
		echo $row['LoginID'];
		echo "</td><td>"; 
		echo $row['Password'];
		echo "</td><td>"; 
		echo $row['Email'];
		echo "</td><td>"; 
		echo $row['PhoneNumber'];
		echo "</td><td>"; 
		echo $row['State'];
		echo "</td><td>"; 
		echo $row['City'];
		echo "</td><td>"; 
		echo $row['Street_Num'];
		echo "</td><td>"; 
		echo $row['Road'];
		echo "</td><td>"; 
		echo $row['Zip_Code'];
		echo "</td><td>"; 
		echo $row['Country'];
		echo "</td><td>"; 
		echo $row['Type']; 
		
		echo "</td><td>";
				echo "<form action='deleteUser.php' method='POST'>";
				echo "    <input type='hidden' name='ID' value = ".$row['LoginID']." />";
				echo "    <input type='submit' name='Submit' value ='Delete User'/>";
		echo "</form>";
		echo "</td></tr>";
		
	}
	mysql_close();

?>

<!-- Footer Goes Here -->
<div id="footer">
<hr>
<P>(C)Copyright 2011 Zion's DBA. All Rights Reserved</P>
</div>

</BODY>
</HTML>